From: Jasper St. Pierre Date: Sun, 23 Dec 2012 09:15:51 +0000 (-0500) Subject: shell-global: Remove hacks around clutter_event_get_current_time() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5157 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5566aa45889956b51149a822ff5b9adbcb66ec29;p=gnome-shell.git shell-global: Remove hacks around clutter_event_get_current_time() clutter_event_get_current_time() has been fixed upstream as part of reentrant bug fixes, so there's no need for these shenanigans. https://bugzilla.gnome.org/show_bug.cgi?id=690665 --- diff --git a/src/shell-global.c b/src/shell-global.c index c95f07803..2a6b14e89 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -1415,7 +1415,7 @@ shell_global_get_current_time (ShellGlobal *global) from some Clutter event callbacks. clutter_get_current_event_time() will return the correct time - from a Clutter event callback, but may return an out-of-date + from a Clutter event callback, but may return CLUTTER_CURRENT_TIME timestamp if called at other times. So we try meta_display_get_current_time() first, since we @@ -1425,17 +1425,9 @@ shell_global_get_current_time (ShellGlobal *global) time = meta_display_get_current_time (global->meta_display); if (time != CLUTTER_CURRENT_TIME) - return time; - /* - * We don't use clutter_get_current_event_time as it can give us a - * too old timestamp if there is no current event. - */ - clutter_event = clutter_get_current_event (); + return time; - if (clutter_event != NULL) - return clutter_event_get_time (clutter_event); - else - return CLUTTER_CURRENT_TIME; + return clutter_get_current_event_time (); } /**